package com.suneast.suneaststore.modules.common.entity;

public class Picture {

    public enum State {UPLOADING, FINISH}

    private State state;

    private final String path; // 本地的路径或网络路径

    private final String key;

    public Picture(String path, String key) {
        this.path = path;
        this.key = key;
        this.state = State.UPLOADING;
    }

    public void setState(State state) {
        this.state = state;
    }

    public State getState() {
        return state;
    }

    public boolean isUploading() {
        return state == State.UPLOADING;
    }

    public String getPath() {
        return path;
    }

    public String getKey() {
        return key;
    }


}
